---
title: MariaDB SkySQL Setup Guide with MindsDB
sidebarTitle: MariaDB SkySQL
---

Find more information on MariaDB Sky SQL [here](https://cloud.MariaDB.com/)

## 1. Select your service for MindsDB

If you haven't already, identify the service to be enabled with MindsDB and make
sure it is running. Otherwise, skip to step 2.

<iframe
  className="w-full h-96"
  width="613"
  height="286"
  src="https://www.youtube.com/embed/XLJ7xD9BRu8"
  title="MariaDB SkySQL Service"
  frameBorder="0"
  allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
  allowFullScreen
></iframe>

## 2. Add MindsDB to your service Allowlist

Access to MariaDB SkySQL services is
[restricted on a per-service basis](https://mariadb.com/products/skysql/docs/security/firewalls/ip-allowlist-services/).
Add the following IP addresses to allow MindsDB to connect to your MariaDB
service, do this by clicking on the cog icon and navigating to Security Access.
In the dialog, input as prompted – one by one – the following IPs:

```
18.220.205.95
3.19.152.46
52.14.91.162
```

<iframe
  className="w-full h-96"
  width="613"
  height="286"
  src="https://www.youtube.com/embed/zaUM5kw8vJs"
  title="MariaDB SkySQL Allowlist"
  frameBorder="0"
  allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
  allowFullScreen
></iframe>

## 3. Download your service .pem file

A
[certificate authority chain](https://mariadb.com/products/skysql/docs/connect/connection-parameters-portal/#certificate-authority-chain)
(.pem file) must be provided for proper TLS certificate validation.

From your selected service, click on the world globe icon (Connect to service).
In the Login Credentials section, click Download. The `aws_skysql_chain.pem`
file will download onto your machine.

<iframe
  className="w-full h-96"
  width="613"
  height="286"
  src="https://www.youtube.com/embed/tBCrPSPHKds"
  title="MariaDB SkySQL Pem File"
  frameBorder="0"
  allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
  allowFullScreen
></iframe>

## 4. Publically Expose your service .pem File

Select secure storage for the `aws_skysql_chain.pem` file that allows a working
public URL or localpath.

<iframe
  className="w-full h-96"
  width="613"
  height="286"
  src="https://www.youtube.com/embed/nCPvBmnV7as"
  title="MariaDB SkySQL Pem s3"
  frameBorder="0"
  allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
  allowFullScreen
></iframe>

## 5. Link [MindsDB](https://cloud.mindsdb.com) to your MariaDB SkySQL Service

To print the query template, select Add Data in either the top or side
navigation and choose MariaDB SkySQL from the list. Fill in the values and run
a query to complete the setup.

<iframe
  className="w-full h-96"
  width="613"
  height="286"
  src="https://www.youtube.com/embed/yG4qZBDu918"
  title="MindsDB MariaDB SkySQL Step5, Connection."
  frameBorder="0"
  allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
  allowFullScreen
></iframe>

Here are the codes:

<CodeGroup>

    ```sql Template
    CREATE DATABASE maria_datasource            --- display name for the database
    WITH ENGINE = 'MariaDB',                      --- name of the MindsDB handler
    PARAMETERS = {
      "host": " ",                              --- host IP address or URL
      "port": ,                                 --- port used to make TCP/IP connection
      "database": " ",                          --- database name
      "user": " ",                              --- database user
      "password": " ",                          --- database password
      "ssl": True/False,                        --- optional, the `ssl` parameter value indicates whether SSL is enabled (`True`) or disabled (`False`)
      "ssl_ca": {                               --- optional, SSL Certificate Authority
        "path": " "                                 --- either "path" or "url"
      },
      "ssl_cert": {                             --- optional, SSL certificates
        "url": " "                                  --- either "path" or "url"
      },
      "ssl_key": {                              --- optional, SSL keys
        "path": " "                                 --- either "path" or "url"
      }
    };
    ```

    ```sql Example for MariaDB SkySQL Service
    CREATE DATABASE skysql_datasource
    WITH ENGINE = 'MariaDB',
    PARAMETERS = {
      "host": "mindsdbtest.mdb0002956.db1.skysql.net",
      "port": 5001,
      "database": "mindsdb_data",
      "user": "DB00007539",
      "password": "password",
      --- here, the SSL certificate is required
      "ssl-ca": {
        "url": "https://mindsdb-web-builds.s3.amazonaws.com/aws_skysql_chain.pem"
      }
    };
    ```

</CodeGroup>

<br/><br/>

<Note>
**MindsDB Pro**

To connect to the MindsDB Pro account, use the details below:

```
Host: <dedicated instance ip>
Port: 3306
Username: <your MindsDB Cloud username>
Password: <your MindsDB Cloud password>
```
</Note>

## What's Next?

Now that you are all set, we recommend you check out our **Tutorials** and
**Community Tutorials** sections, where you'll find various examples of
regression, classification, and time series predictions with MindsDB.

To learn more about MindsDB itself, follow the guide on
[MindsDB database structure](/sql/table-structure/). Also, don't miss out on the
remaining pages from the **SQL API** section, as they explain a common SQL
syntax with examples.

Have fun!
